<!--index--页面顶部导航栏_备份-->
<nav class="navbar navbar-default" role="navigation">
    <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="#">AILK-CRM 版本管理系统</a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <%if(user){%>
            <%if(user.isBoss){%>
            <ul  class="nav navbar-nav">
                <a class="btn  btn-info btn-sm" btnname="btnFindAllTasksForBoss" btnurl="" href="#" id="btnFindAllTasksForBoss" style = "color:white;margin-top:9px; "> 查找变更单 </a>
            </ul>
            <%}%>
            <%if(userPros && userPros.length>0){%>
                <ul id="navMenu" class="nav navbar-nav">
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">操作<span class="caret"></span></a>
                        <ul class="dropdown-menu" role="menu">
                            <li><a class="menuBtn" btnname="btnSubmitApply" btnurl="" href="#" id="btnSubmitApply"> 申请变更单 </a></li>
                            <li><a class="menuBtn" btnname="btnFindTasks" btnurl="" href="#" id="btnFindTasks"> 查找变更单 </a></li>
                            <%if(user && (user.isAdmin)){ %>
                            <li><a class="menuBtn" btnname="btnFindAllTasks" btnurl="" href="#" id="btnFindAllTasks"> 查找所有变更单 </a></li>
                            <% } %>
                        </ul>
                    </li>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">视图<span class="caret"></span></a>
                        <ul class="dropdown-menu" role="menu">
                            <li><a class="menuBtn" btnname="btnTaskCreater" btnurl="/btnTaskCreater" href="/btnTaskCreater" id="btnTaskCreater"> 我发起的变更单 </a></li>
                            <li><a class="menuBtn" btnname="btnToBeDeal" btnurl="/btnToBeDeal" href="/btnToBeDeal" id="btnToBeDeal"> 待处理的变更单 </a></li>
                        </ul>
                    </li>

                    <!--&lt;!&ndash;用户特有的菜单按钮&ndash;&gt;-->
                    <!--<%if(menus&&menus!=null){ var secFlag=false; var thirdFlag=false;%>-->
                        <!--<li class="dropdown">-->
                            <!--<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">视图<span class="caret"></span></a>-->
                            <!--<ul class="dropdown-menu" role="menu">-->
                                <!--<% menus.forEach(function(menu){ %>-->
                                    <!--<%var menuId = menu.menuId; var menuName = menu.menuName; var menuBtnName=menu.menuBtnName; var menuUrl=menu.url;%>-->
                                    <!--<li><a class="menuBtn" btnName="<%=menuBtnName%>" btnUrl="<%=menuUrl%>" href="<%=menuUrl%>" id="<%=menuBtnName%>"> <%= menuName %> </a></li>-->
                                <!--<% }); %>-->
                            <!--</ul>-->
                        <!--</li>-->
                    <!--<% } %>-->
                </ul>
            <%}%>
            <% } %>
            <!--根据变更单号查询变更单信息-->
            <!--<form class="navbar-form navbar-left" role="search">-->
                <!--<div class="input-group">-->
                    <!--<input type="text" class="form-control" placeholder="输入变更单号搜索">-->
                    <!--<span class="input-group-btn">-->
                        <!--<button class="btn btn-default" type="button">搜索</button>-->
                    <!--</span>-->
                <!--</div>-->
            <!--</form>-->


            <ul class="nav navbar-nav navbar-right">
                <%if(!user){ %>
                <li class="dropdown"><a href="/users/login">登录</a></li>
                <li class="dropdown"></li>
                <li class="dropdown"><a href="/users/reg">注册</a></li>
                <% } else { %>
                <!--<li class="dropdown"><a href="#">当前用户：(<%=user.userName%>)</a></li>-->
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">当前用户：(<%=user.userName%>)<span class="caret"></span></a>
                    <ul class="dropdown-menu" role="menu">
                        <li><a href="/users/modifyUser">修改资料</a></li>
                        <li class="divider"></li>
                        <li><a href="/users/logout">退出</a></li>
                    </ul>
                </li>
                <% } %>
            </ul>

            <%if(user && user.isLeader){ %>
                <ul class="nav navbar-nav navbar-right">
                    <!--<button type="button" class="btn btn-default navbar-btn">-->
                        <!--<li class="dropdown"><a href="/leaderModel/leader">立即变身领导模式</a></li>-->
                        <a style="margin-top:9px;" class="btn btn-danger btn-sm" href="/leaderModel/leader" role="button">立即变身领导模式</a>
                    <!--</button>-->
                </ul>
            <%}%>
            <% if(user &&( user.isBoss)){ %>
            <ul class="nav navbar-nav navbar-right">
                <!--<button type="button" class="btn btn-default navbar-btn">-->
                <!--<li class="dropdown"><a href="/leaderModel/leader">立即变身领导模式</a></li>-->
                <a style="margin-top:9px;" class="btn btn-danger btn-sm" href="/leaderModel/leaderForBoss" role="button">变更单统计</a>
                <!--</button>-->
            </ul>
            <%}%>
            <%if(user && user.userName=='sAdmin'){ %>
            <ul class="nav navbar-nav navbar-right">
                <!--<button type="button" class="btn btn-default navbar-btn">-->
                <!--<li class="dropdown"><a href="/leaderModel/leader">立即变身领导模式</a></li>-->
                <li><a href="/superModel/super" role="button">超级管理员模式</a></li>
                <!--</button>-->
            </ul>
            <%}%>
        </div><!-- /.navbar-collapse -->
    </div><!-- /.container-fluid -->
</nav>